/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.pa165.languageschoolservice.DTO;


import java.io.Serializable;


/**
 *
 * @author Elena Medvedeva
 */
public class LectorDTO implements Serializable {

    private static final long serialVersionUID = 1L;
    private Long id;
    private String surname;
   
    private String name;
    
    private String fullName;
   

    public String getSurname() {
        return surname;
    }

    public void setSurname(String surname) {
        this.surname = surname;
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }
    
    public void setFullName(String fullName) {
        this.fullName = fullName;
    }

    public String getFullName() {
        if (surname != null) {
            return name + " " + surname;
        } else {
            return name;
        }
    }

    @Override
    public String toString() {
        return "LectorDTO:{id=" + id + ", name=" + name + "}";
    }

    @Override
    public boolean equals(Object object) {

        if (!(object instanceof LectorDTO)) {
            return false;
        }
        LectorDTO other = (LectorDTO) object;
        if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id))) {
            return false;
        }
        return true;
    }

    @Override
    public int hashCode() {
        int hash = 5;
        hash = 59 * hash + (this.id != null ? this.id.hashCode() : 0);
        return hash;
    }
}
